package com.lifeonwalden.game.mindustry.constant;

public enum Gate {
    UP, RIGHT, BOTTOM, LEFT;

    public Gate linkedGate() {
        switch (this) {
            case UP: {
                return BOTTOM;
            }
            case RIGHT: {
                return LEFT;
            }
            case BOTTOM: {
                return UP;
            }
            case LEFT:
            default: {
                return RIGHT;
            }
        }
    }

    public static Gate fromOrdinal(int ordianl) {
        switch (ordianl) {
            case 0: {
                return UP;
            }
            case 1: {
                return RIGHT;
            }
            case 2: {
                return BOTTOM;
            }
            default: {
                return LEFT;
            }
        }
    }
}
